<template>
   <div class="product">
    <!-- <SmallSon></SmallSon> -->
    <h3>标题:{{proname}}</h3>
    <p>价格: {{proprice}}  元一根</p>
    <p>描述:{{desc}} </p>
    <button @click='newPrce'>砍一刀</button>
  </div>
</template>
 
<script>
export default {
  name:'HmSon',
 //接收数据
 props:['id','proname','proprice','desc'],
 methods:{
  newPrce(){
    this.$emit('NewPrice',this.id)
  }
 }
};
</script>

<style lang="less" scoped>
.product {
  width: 400px;
  border: 3px solid #000;
  border-radius: 5px;
  margin: 10px;
  padding: 0 20px;
}
</style>